#pragma once

#include <MCF/Code/StdMCF.hpp>
#include <MCF/Code/ModelessDialogClass.hpp>
#include <MCF/Code/WavPlayerClass.hpp>

class BuzzerClass sealed : public MCF::ModelessDialogClass, public MCF::WavPlayerClass {
private:
	static bool _EventBuzzerToggle(std::intptr_t nContext, std::intptr_t nArg1, std::intptr_t nArg2, std::intptr_t nArg3);
public:
	BuzzerClass();
	~BuzzerClass();
protected:
	virtual void _PostSubclass() override;
	virtual void _PreUnsubclass() override;

	virtual bool _OnCommand(WORD wNotifyCode, int nControlID, HWND hSender) override;

	virtual void _PrePlayback() override;
	virtual void _PostPlayback() override;
private:
	void _Toggle(bool bToTurnOn);
public:
	void AssignWavFile(const void *lpWavFileContents, std::size_t uSize);
	void Mute(bool bToMute);
};
